package me.muci.abstractFactoryPattern.factory;

import me.muci.abstractFactoryPattern.Color;
import me.muci.abstractFactoryPattern.Shape;
import me.muci.abstractFactoryPattern.impl.Blue;
import me.muci.abstractFactoryPattern.impl.Green;
import me.muci.abstractFactoryPattern.impl.Red;

/**
 * ClassName: ColorFactory <br/>
 * Description: <br/>
 * date: 2021/8/4 15:58<br/>
 *
 * @author muci<br />
 * @description
 * @since JDK 1.8
 */
public class ColorFactory extends AbstractFactory{
    @Override
    public Color getColor(String color) {
        switch (color){
            case "RED":
                return new Red();
            case "GREEN":
                return new Green();
            case "BLUE":
                return new Blue();
            default:
                return null;
        }
    }

    @Override
    public Shape getShape(String shapeType) {
        return null;
    }
}
